var express = require('express');
var router = express.Router();

/* GET users listing. */
router.get('/getPower', function(req, res, next) {
  let data = {
    code:200,
    msg:'请求成功',
    data:[
      {
        path: '/',
        name: '',
        component: 'views/first',
        meta: {icon: '', title: '一级-first/list1'},
        children:[
          {path: 'List11', name: 'List11', meta: {icon: '', title: 'List11'}, component: 'views/list1/list1-1.vue'},
          {path: 'List12', name: 'List12', meta: {icon: '', title: 'List12'}, component: 'views/list1/list1-2.vue'},
          {path: 'List13', name: 'List13', meta: {icon: '', title: 'List13'}, component: 'views/list1/list1-3.vue'}
        ]
      },
      {
        path: '/',
        name: '',
        component: 'views/first',
        meta: {icon: '', title: '一级-first/list2'},
        children:[
          {path: 'List21', name: 'List21', meta: {icon: '', title: 'List21'}, component: 'views/list2/list2-1.vue'},
          // {path: 'List21', name: 'List21', component: (resolve) => require(['./views/list2/list2-1.vue'], resolve)},
          // {path: 'List22', name: 'List22', component: (resolve) => require(['./views/list2/list2-2.vue'], resolve)},
          // {path: 'List23', name: 'List23', component: (resolve) => require(['./views/list2/list2-3.vue'], resolve)}
        ]
      }
    ]
  }
  // res.send('respond with a resource');
  res.json(data)
});

module.exports = router;
